home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mobiclic 72
/
MOBICLIC 72.ISO
/
mac
/
DATA
/
TCHATCHE
/
doggy2004.cst
/
00427_Script_427
< prev
next >
Wrap
Text File
|
2005-02-02
|
2KB
|
94 lines
-- gestion des drapeaux
property s, nom,dernierSon
global langue, pistePremierDrapeau,laboActif,sonIntLangues
global interLangues
on beginSprite me
s = me.SpriteNum
nom = sprite(s).member.name
LC = nom.char[nom.char.count]
if LC = "a" then pistePremierDrapeau = s
suff = suffixeLangue()
if LC = suff then
sprite(s).member = member("drapeau1" & LC)
else
sprite(s).member = member("drapeau0" & LC)
end if
end
on MouseEnter me
if _movie.pauseState() then exit
if interLangues=0 then exit
if laboActif=1 then exit
if controleTcha03()=0 then exit
if sprite(s).member.name contains "drapeau1" then exit
_player.cursor(280)
sprite(s).member = nom & "_" & suffixeLangue() & "_1"
-- jouer le son correspondant au bouton
if sound(3).status = 3 then exit
if sonIntLangues = 0 then exit
LBout = ["Drapeau0d","Drapeau0a","Drapeau0b","Drapeau0c"]
p = getPos(LBout,nom)
if p<>0 then nomSon = "bout" & string(p+6)
memSon = dernierSon
sound(4).volume = sound(3).volume
sound(4).playFile("@/sons_tchatche/" & nomSon & suffixeLangue())
dernierSon = memSon
end
on mouseLeave
if _movie.pauseState() then exit
if interLangues=0 then exit
if laboActif=1 then exit
if controleTcha03()=0 then exit
cursor -1
if sprite(s).member.name contains "drapeau1" then exit
sprite(s).member = nom & "_" & suffixeLangue()
coupeSon 4
end
on mouseUp me
if laboActif=1 then exit
if interLangues=0 then exit
if controleTcha03()=0 then exit
if _mouse.mouseV<455 then exit
_player.cursor(-1)
lettreLangue = the last char of nom
L = ["a","b","c","d"]
langue = getPos(L,lettreLangue)
nomD = nom
put "1" into char 8 of nomD
sprite(s).member = nomD & "_" & suffixeLangue() & "_2"
majDrapeaux
choixLangue
end
on majDrapeaux
compteur=0
repeat with i = pistePremierDrapeau to pistePremierDrapeau+3
compteur = 1+compteur
if compteur<>langue then
nomD = sprite(i).member.name
if nomD contains "Drapeau" then
LC = nomD.char[9]
sprite(i).member = member("drapeau0" & LC)
end if
end if
end repeat
end
-- empΩcher le chgt de langue pendant un jeu tcha03
on controleTcha03
if _movie.name contains "03" then
if _movie.frame > label("0") and _movie.frame < label("fin") then
return 0
else
return 1
end if
else
return 1
end if
end